home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / +system+ / afcd_install next >
Text File  |  1999-12-15  |  18KB  |  700 lines

  1. ; $VER: AFCD_Install 2.0 (14.12.99)
  2. ;   by Oliver Roberts (oliver.roberts@iname.com)
  3.  
  4. ;*************
  5. ; LOCALE INIT
  6. ;*************
  7.  
  8. (if (= (exists "Env:Language") 1)
  9.     (set @language (getenv "Language"))
  10. )
  11.  
  12. ;*****************
  13. ; ENGLISH STRINGS
  14. ;*****************
  15.  
  16. (set #str-yes "Yes")
  17. (set #str-no "No")
  18. (set #str-askfind "Copy AFCDFind to your hard drive?")
  19. (set #str-findno "No - I'd rather use it from the CD")
  20. (set #str-findprog "Yes - Just the program itself")
  21. (set #str-findall "Yes - The program and all the indices")
  22. (set #str-finddest "Select where the AFCDFind program files should be installed (no drawer will be created!)")
  23. (set #str-askaminet "Copy the Aminet index listing to your hard drive?\n(requires approx 5Mb disk space)")
  24. (set #str-copyaminetindex "Copying Aminet index file")
  25. (set #str-settooltypes "Setting tooltypes")
  26. (set #str-updating "Updating %s")
  27. (set #str-updateinstaller "Checking to see whether Installer should be updated")
  28. (set #str-updateview "Checking to see whether AFCDView needs to be copied to C: (i.e. if it's not there already or you have an old version")
  29. (set #str-notoncd "Set the NOTONCD tooltype?\n(see help for info)")
  30. (set #str-indexdir "Select where the AFCD index files should be installed")
  31. (set #str-arexxdest "Select where the AFCDFind ARexx script should be installed (required for full functionality)")
  32. (set #str-aminetdest "Select where the Aminet index file should be installed")
  33. (set #str-complete (cat
  34.     "Installation of your chosen files has now been completed\n\n"
  35.     "The choices that you have made will be saved and will be used "
  36.     "as the defaults when you next run this installer"
  37. ))
  38. (set #str-installmode (cat
  39.     "Do you wish to view/change your existing settings or just update "
  40.     "the files using your current settings?"
  41. ))
  42. (set #str-modenew "Change these settings")
  43. (set #str-modeview "View settings")
  44. (set #str-modeupdate "Update files")
  45. (set #str-copyafbase "Copying AFBase files")
  46. (set #str-askafbase "Copy AFBase to your hard drive?")
  47. (set #str-afbaseno "No - I'd rather use it from the CD")
  48. (set #str-afbaseyes "Yes")
  49. (set #str-afbasedest "Select where the AFBase should be installed (no drawer will be created!)")
  50. (set #str-askmuibase (cat
  51.     "AFBase will require MUIbase to be installed on your drive.  Should "
  52.     "I run the MUIbase installer for you?"
  53. ))
  54. (set #str-muibaseno "No - I'll install it later")
  55. (set #str-muibaseyes "Yes")
  56. (set #str-muibasecancel "I've changed my mind - don't install AFBase!")
  57. (set #str-muibaselaunch "Launching MUIbase installer...")
  58. (set #str-muibasefail (cat
  59.     "Unable to launch MUIbase installer - you will need to run the installer "
  60.     "manually from +System+/Tools/WB/Muibase)"
  61. ))
  62. (set #str-copyunpackers "Copying archive unpackers")
  63. (set #str-askunpackers "Copy LhA, LZX and/or UnZip (archive unpackers) to your hard drive?")
  64. (set #str-unpackersdest "Select directory where the unpackers should be copied to")
  65. (set #str-currentabove "Your current settings are shown above")
  66. (set #str-modeview "View current settings")
  67. (set #str-modecurrent "Change current settings")
  68. (set #str-viewset "Viewing settings via external viewer - close to continue")
  69. (set #str-os35 "Upgrade to AmigaOS 3.5 for optimum functionality!")
  70.  
  71. (set #help-updateinstaller (cat
  72.     "This installer script will automatically update your copy of Installer "
  73.     "if you are using an older version"
  74. ))
  75. (set #help-updateview (cat
  76.     "This installer script will automatically update your copy of AFCDView "
  77.     "which is required to view files on this CD via the AFCDPrefs system"
  78. ))
  79. (set #help-find (cat
  80.     "Although AFCDFind works just fine from the CD, you may wish to "
  81.     "install it on your hard drive.  If so, then there are two different "
  82.     "variations to choose from:\n\n"
  83.     "1. Just the AFCDFind program files will be copied to your hard "
  84.     "drive.  You could then create a \"left out\" icon via Workbench "
  85.     "so you can easily access AFCDFind from Workbench.  However, for "
  86.     "this to work, you'll still need an AFCD in your drive.\n\n"
  87.     "2. In addition to copying all the AFCDFind program files to your "
  88.     "hard drive, you can choose to copy all the CD index files too.  "
  89.     "This may be faster, and it also means that you can use AFCDFind "
  90.     "even if there is no AFCD in your CD drive.  However, you'll need "
  91.     "to have quite a bit of spare space to use this option (30Mb+ at "
  92.     "the time of writing!\n\n"
  93. ))
  94. (set #help-notoncd (cat
  95.     "Currently, setting this tooltype just changes the text in the Search "
  96.     "cycle gadget.  Normally, there will be \"This CD\" and \"Last 5 CDs\" options. "
  97.     "If you specify this tooltype, these will be replaced with the actual CD "
  98.     "numbers. You may prefer this when running AFCDFind off your hard drive "
  99.     "instead of the CD.\n\n"
  100. ))
  101. (set #help-afbase (cat
  102.     "You will be able to use AFBase without problems directly from the CD. "
  103.     "However, access to database records could be slow depending on the "
  104.     "speed of your CD-ROM drive. Therefore, you may want to consider "
  105.     "installing AFBase to your hard drive for extra speed.\n\n"
  106.     "Note: AFBase uses Steffen Gutmann's MUIbase software - if you want "
  107.     "to install AFBase, MUIbase will need to be present on your hard drive. "
  108.     "If this installer can't find it, it'll ask you whether you want to "
  109.     "install it or not (MUIbase can be found in +System+/Tools/WB)."
  110. ))
  111.  
  112. ;************
  113. ; PROCEDURES
  114. ;************
  115.  
  116. (procedure P_SaveChoices
  117.     (textfile
  118.         (dest "ENV:AFCD_Install")
  119.         (append
  120.             (cat
  121.                 ("FINDINSTALL=%ld\n" #findinstall)
  122.                 ("FINDDIR=%s\n" #finddir)
  123.                 ("AMINETINSTALL=%ld\n" #aminetinstall)
  124.                 ("AMINETDIR=%s\n" #aminetdir)
  125.                 ("FINDDOPUS=%ld\n" #find-dopus)
  126.                 ("AFBASEINSTALL=%ld\n" #afbaseinstall)
  127.                 ("AFBASEDIR=%s\n" #afbasedir)
  128.                 ("UNPACKINSTALL=%ld\n" #unpackersinstall)
  129.                 ("UNPACKDIR=%s\n" #unpackersdir)
  130.             )
  131.         )
  132.         (safe)
  133.     )
  134.     (copyfiles
  135.         (source "ENV:AFCD_Install")
  136.         (dest "ENVARC:")
  137.         (nogauge)
  138.         (safe)
  139.     )
  140. )
  141.  
  142. (procedure P_ReadFindTooltypes
  143.     (set #indexdir (tackon #finddir "AFCD_Indices"))
  144.     (set #matchscript (tackon #finddir "AFCDFind-HandleMatch.rexx"))
  145.     (if (AND (exists (tackon #finddir "AFCDFind.info")) (>= @installer-version 2752524))
  146.         (
  147.             (set #find-notoncd "off")
  148.             (iconinfo
  149.                 (dest (tackon #finddir "AFCDFind"))
  150.                 (gettooltype "NOTONCD" "#find-notoncd")
  151.                 (gettooltype "INDEXDIR" "#indexdir")
  152.                 (gettooltype "MATCHSCRIPT" "#matchscript")
  153.                 (safe)
  154.             )
  155.         )
  156.     )
  157.     (set #find-notoncd (<> "off" #find-notoncd))
  158.     (if (= #indexdir (cat #cddevice ":+System+/Indices"))
  159.         (set #indexdir (tackon #finddir "AFCD_Indices"))
  160.     )
  161. )
  162.  
  163. (set #str-sep "------------------------------------------------------------------------------------------\n")
  164.  
  165. (procedure P_GetViewSettingsString
  166.     (cat
  167.         ("1. Install AFCDFind?\n\n   %s\n" (select #findinstall #str-findno #str-findprog #str-findall))
  168.         (if (> #findinstall 0) ("   Destination:   %s\n" #finddir))
  169.         (if (> #findinstall 1) ("   Index dir:   %s\n" #indexdir))
  170.         ("   NOTONCD tooltype:   %s\n" (if #find-notoncd "Set" "Unset"))
  171.         ("   ARexx script:   %s\n" #matchscript)
  172.         (#str-sep)
  173.         ("2. Install AFBase?\n\n   %s\n" (if #afbaseinstall #str-yes #str-no))
  174.         (if (> #afbaseinstall 0) ("   Destination:   %s\n" #afbasedir))
  175.         (#str-sep)
  176.         ("3. Install Aminet Index?\n\n   %s\n" (if #aminetinstall #str-yes #str-no))
  177.         (if (> #aminetinstall 0) ("   Destination:   %s\n" #aminetdir))
  178.         (#str-sep)
  179.         ("4. Install Unpackers?\n\n   %s\n" (if #unpackersinstall #str-yes #str-no))
  180.         (if (> #unpackersinstall 0) ("   Destination:   %s\n" #unpackersdir))
  181.         (#str-sep)
  182.     )
  183. )
  184.  
  185. ;******
  186. ; INIT
  187. ;******
  188.  
  189. (if (= "AFCD" (substr (expandpath ":") 0 4))
  190.     ; started from an AFCD
  191.     (set #cddevice (getdevice ":"))
  192.     ; not started from an AFCD (for testing purposes)
  193.     (set #cddevice "CD0")
  194. )
  195.  
  196. (set #finddir @default-dest)
  197. (set #aminetdir @default-dest)
  198. (set #findinstall 0)
  199. (set #aminetinstall 0)
  200. (set #find-notoncd 1)
  201. (set #afbaseinstall 0)
  202. (set #muibaseinstall 0)
  203. (set #afbasedir @default-dest)
  204. (set #unpackersinstall 0)
  205. (set #unpackersdir "C:")
  206.  
  207. (set #configexists (exists "ENV:AFCD_Install" (noreq)))
  208.  
  209. (delete "ENV:AFCDCfg.line" (safe))
  210. (set #ln 1)
  211. (if #configexists
  212.     (while (> #ln 0)
  213.         (run ("C/GetCfgLine ENV:AFCD_Install ENV:AFCDCfg.line %ld" #ln) (safe))
  214.         (set #line (getenv "AFCDCfg.line"))
  215.         (delete "ENV:AFCDCfg.line" (safe))
  216.         (if (> (strlen #line) 0)
  217.             (
  218.                 (set #i 0)
  219.                 (while (<> (substr #line #i 1) "=")
  220.                     (set #i (+ #i 1))
  221.                 )
  222.                 (set #var (substr #line 0 #i))
  223.                 (set #i (+ #i 1))
  224.                 (set #k #i)
  225.                 (while (<> (substr #line #i 1) "\n")
  226.                     (set #i (+ #i 1))
  227.                 )
  228.                 (if (> (- #i #k) 0)
  229.                     (
  230.                         (set #val (substr #line #k (- #i #k)))
  231.                         (if (= "FINDINSTALL" #var)
  232.                             (set #findinstall (+ #val))
  233.                         )
  234.                         (if (= "FINDDIR" #var)
  235.                             (set #finddir #val)
  236.                         )
  237.                         (if (= "AMINETINSTALL" #var)
  238.                             (set #aminetinstall (+ #val))
  239.                         )
  240.                         (if (= "AMINETDIR" #var)
  241.                             (set #aminetdir #val)
  242.                         )
  243.                         (if (= "FINDDOPUS" #var)
  244.                             (set #find-dopus (+ #val))
  245.                         )
  246.                         (if (= "AFBASEINSTALL" #var)
  247.                             (set #afbaseinstall (+ #val))
  248.                         )
  249.                         (if (= "AFBASEDIR" #var)
  250.                             (set #afbasedir #val)
  251.                         )
  252.                     )
  253.                 )
  254.                 (set #i (+ #i 1))
  255.                 (set #ln (+ #ln 1))
  256.             )
  257.             ; else
  258.             (set #ln 0)
  259.         )
  260.     )
  261. )
  262.  
  263. ; ALWAYS ON!
  264. (set #find-dopus 1)
  265.  
  266. ;*******************
  267. ; INTERACTIVE START
  268. ;*******************
  269.  
  270. (welcome)
  271.  
  272. (if #configexists
  273.     (if (>= (/ @installer-version 65536) 44)
  274.         (
  275.             (P_ReadFindTooltypes)
  276.             (textfile
  277.                 (dest "T:Current Install Settings")
  278.                 (append (P_GetViewSettingsString))
  279.                 (safe)
  280.             )
  281.                     (showmedia "#settingstxt" "T:Current Install Settings" "upper_center" "small" 1)
  282.             (set #interactive
  283.                 (askchoice
  284.                     (prompt #str-currentabove)
  285.                     (help @askchoice-help)
  286.                     (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-modenew) #str-modeupdate)
  287.                     (default 1)
  288.                 )
  289.             )
  290.             (closemedia #settingstxt)
  291.             (delete "T:Current Install Settings" (safe))
  292.         )
  293.         ; else
  294.         (
  295.             (P_ReadFindTooltypes)
  296.             (textfile
  297.                 (dest "T:Current Install Settings")
  298.                 (append (P_GetViewSettingsString))
  299.                 (safe)
  300.             )
  301.             (set #choice 0)
  302.             (while (= #choice 0)
  303.                 (set #choice
  304.                     (askchoice
  305.                         (prompt #str-os35)
  306.                         (help @askchoice-help)
  307.                         (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-modeview) #str-modecurrent #str-modeupdate)
  308.                         (default #choice)
  309.                     )
  310.                 )
  311.                 (if (= #choice 0)
  312.                     (
  313.                         (working #str-viewset)
  314.                         (run "C:AFCDView \"T:Current Install Settings\"" (safe))
  315.                     )
  316.                 )
  317.             )
  318.             (set #interactive (- #choice 1))
  319.             (delete "T:Current Install Settings" (safe))
  320.         )
  321.     )
  322.     ; else
  323.     (set #interactive 0)
  324. )
  325.  
  326. (if (= #interactive 0)
  327.     (
  328.         (set #findinstall
  329.             (askchoice
  330.                 (prompt #str-askfind)
  331.                 (help #help-find @askchoice-help)
  332.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-findno) #str-findprog #str-findall)
  333.                 (default #findinstall)
  334.             )
  335.         )
  336.  
  337.         (if #findinstall
  338.             (
  339.                 (set #finddir
  340.                     (askdir
  341.                         (prompt #str-finddest)
  342.                         (help @askdir-help)
  343.                         (default #finddir)
  344.                     )
  345.                 )
  346.                 (P_ReadFindTooltypes)
  347.                 (if (= #findinstall 2)
  348.                     (set #indexdir
  349.                         (askdir
  350.                             (prompt #str-indexdir)
  351.                             (help @askdir-help)
  352.                             (default #indexdir)
  353.                             (newpath)
  354.                         )
  355.                     )
  356.                 )
  357.                 (set #matchscript (tackon
  358.                     (askdir
  359.                         (prompt #str-arexxdest)
  360.                         (help @askdir-help)
  361.                         (default #matchscript)
  362.                     )
  363.                     "AFCDFind-HandleMatch.rexx")
  364.                 )
  365.                 (set #find-notoncd
  366.                     (askchoice
  367.                         (prompt #str-notoncd)
  368.                         (help #help-notoncd @askchoice-help)
  369.                         (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  370.                         (default #find-notoncd)
  371.                     )
  372.                 )
  373.             )
  374.         )
  375.  
  376.         (set #afbaseinstall
  377.             (askchoice
  378.                 (prompt #str-askafbase)
  379.                 (help #help-afbase @askchoice-help)
  380.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-afbaseno) #str-afbaseyes)
  381.                 (default #afbaseinstall)
  382.             )
  383.         )
  384.  
  385.         (if #afbaseinstall
  386.             (set #afbasedir
  387.                 (askdir
  388.                     (prompt #str-afbasedest)
  389.                     (help @askdir-help)
  390.                     (default #afbasedir)
  391.                 )
  392.             )
  393.         )
  394.  
  395.         (set #aminetinstall
  396.             (askchoice
  397.                 (prompt #str-askaminet)
  398.                 (help @askchoice-help)
  399.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  400.                 (default #aminetinstall)
  401.             )
  402.         )
  403.  
  404.         (if #aminetinstall
  405.             (set #aminetdir
  406.                 (askdir
  407.                     (prompt #str-aminetdest)
  408.                     (help @askdir-help)
  409.                     (default #aminetdir)
  410.                 )
  411.             )
  412.         )
  413.  
  414.         (set #unpackersinstall
  415.             (askchoice
  416.                 (prompt #str-askunpackers)
  417.                 (help @askchoice-help)
  418.                 (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-no) #str-yes)
  419.                 (default #unpackersinstall)
  420.             )
  421.         )
  422.  
  423.         (if #unpackersinstall
  424.             (set #unpackersdir
  425.                 (askdir
  426.                     (prompt #str-unpackersdest)
  427.                     (help @askdir-help)
  428.                     (default #unpackersdir)
  429.                 )
  430.             )
  431.         )
  432.     )
  433.     ; else
  434.     (
  435.         (P_ReadFindTooltypes)
  436.     )
  437. )
  438.  
  439. (if #afbaseinstall
  440.     (if (= (getassign "MUIbase") "")
  441.         (
  442.             (set #muibaseinstall
  443.                 (askchoice
  444.                     (prompt #str-askmuibase)
  445.                     (help #help-afbase @askchoice-help)
  446.                     (choices (cat (if (< @installer-version 2752518) "" "\x1b[2p") #str-muibaseno) #str-muibaseyes #str-muibasecancel)
  447.                     (default #muibaseinstall)
  448.                 )
  449.             )
  450.             (if (= #muibaseinstall 2)
  451.                 (
  452.                     (set #afbaseinstall 0)
  453.                     (set #muibaseinstall 0)
  454.                 )
  455.             )
  456.         )
  457.     )
  458. )
  459.  
  460. ;*******************
  461. ; COPY FILES ACROSS
  462. ;*******************
  463.  
  464. (onerror (P_SaveChoices))
  465.  
  466. (complete 0)
  467.  
  468. (working #str-updateinstaller)
  469.  
  470. (if (= 0 (run "C:Which Installer NORES >ENV:AFCDInst_tmp" (safe)))
  471.     (
  472.         (set #installerloc (getenv "AFCDInst_tmp"))
  473.         (set #installerloc (substr #installerloc 0 (- (strlen #installerloc) 1)))
  474.     )
  475.     ;else
  476.     (set #installerloc "C:")
  477. )
  478.  
  479. (set #skipinstaller 0)
  480. (set #installerfn (tackon #installerloc "Installer"))
  481. (if (exists #installerfn)
  482.     (if (= 0 (run ("C:Version %s >ENV:AFCDInst_tmp" #installerfn) (safe)))
  483.         (
  484.             (set #verstring (getenv "AFCDInst_tmp"))
  485.             (if (= "InstallerNG" (substr #verstring 0 11))
  486.                 (set #skipinstaller 1)
  487.             )
  488.         )
  489.     )
  490. )
  491.  
  492. (if (= #skipinstaller 0)
  493.     (copylib
  494.         (prompt (#str-updating #installerloc))
  495.         (help #help-updateinstaller)
  496.         (source (cat #cddevice ":+System+/C/Installer"))
  497.         (dest (pathonly #installerloc))
  498.         (optional nofail)
  499.         (confirm)
  500.     )
  501. )
  502.  
  503. (delete "ENV:AFCDInst_tmp" (safe))
  504.  
  505. (complete 8)
  506.  
  507. (working #str-updateview)
  508.  
  509. (copylib
  510.     (prompt (#str-updating "C:AFCDView"))
  511.     (help #help-updateview)
  512.     (source (cat #cddevice ":+System+/C/AFCDView"))
  513.     (dest "C:")
  514.     (optional nofail)
  515.     (confirm)
  516. )
  517.  
  518. (complete 10)
  519.  
  520. (if #findinstall
  521.     (
  522.         (copylib
  523.             (source (cat #cddevice ":+System+/Find"))
  524.             (dest #finddir)
  525.             (newname "AFCDFind")
  526.         )
  527.         (if (NOT (exists (tackon #finddir "AFCDFind.info")))
  528.             (
  529.                 (copyfiles
  530.                     (source (cat #cddevice ":+System+/Find.info"))
  531.                     (dest #finddir)
  532.                     (newname "AFCDFind.info")
  533.                 )
  534.                 (tooltype
  535.                     (prompt #str-settooltypes)
  536.                     (dest (tackon #finddir "AFCDFind"))
  537.                     (noposition)
  538.                 )
  539.             )
  540.         )
  541.         ; clear tooltypes first (bug in installer)
  542.         (tooltype
  543.             (prompt #str-settooltypes)
  544.             (dest (tackon #finddir "AFCDFind"))
  545.             (settooltype "NOTONCD")
  546.             (settooltype "(NOTONCD)")
  547.             (settooltype "FASTSTARTUP")
  548.             (settooltype "(FASTSTARTUP)")
  549.             (settooltype "HELPFILE")
  550.             (settooltype "(HELPFILE")
  551.             (settooltype "MATCHSCRIPT")
  552.             (settooltype "(MATCHSCRIPT")
  553.             (settooltype "INDEXDIR")
  554.             (settooltype "(INDEXDIR")
  555.         )
  556.         ; now set tooltypes
  557.         (tooltype
  558.             (prompt #str-settooltypes)
  559.             (dest (tackon #finddir "AFCDFind"))
  560.             (if (= 1 #find-notoncd) (settooltype "NOTONCD" "") (settooltype "(NOTONCD)" ""))
  561.             (settooltype (if (= 2 #findinstall) "(FASTSTARTUP)" "FASTSTARTUP") "")
  562.             (settooltype "HELPFILE" (tackon #finddir "AFCDFind.guide"))
  563.             (settooltype "MATCHSCRIPT" #matchscript)
  564.             (settooltype "INDEXDIR" (if (= #findinstall 2) #indexdir (cat #cddevice ":+System+/Indices")))
  565.         )
  566.         (if (exists (cat #cddevice ":+System+/Info/AFCDFind.guide"))
  567.             (copyfiles
  568.                 (source (cat #cddevice ":+System+/Info/AFCDFind.guide"))
  569.                 (dest #finddir)
  570.                 (infos)
  571.             )
  572.         )
  573.         (copyfiles
  574.             (source (cat #cddevice ":+System+/AFCDFind-HandleMatch.rexx"))
  575.             (dest (pathonly #matchscript))
  576.             (infos)
  577.         )
  578.     )
  579. )
  580.  
  581. (complete 20)
  582.  
  583. (if (= #findinstall 2)
  584.     (
  585.         (if (NOT (exists #indexdir))
  586.             (makedir #indexdir (infos))
  587.         )
  588.         (foreach (cat #cddevice ":+System+/Indices") "(AFCD?|AFCD??)"
  589.             (if (< @each-type 0)
  590.                 (
  591.                     (set #docopyidx 1)
  592.                     (set #idxname (cat #cddevice ":+System+/Indices/" @each-name))
  593.                     (if (exists (tackon #indexdir @each-name))
  594.                         (if (NOT (earlier (tackon #indexdir @each-name) #idxname))
  595.                             (set #docopyidx 0)
  596.                         )
  597.                     )
  598.                     (if #docopyidx
  599.                         (copyfiles
  600.                             (source #idxname)
  601.                             (dest #indexdir)
  602.                             (infos)
  603.                         )
  604.                     )
  605.                 )
  606.             )
  607.         )
  608.     )
  609. )
  610.  
  611. (complete 70)
  612.  
  613. (if #afbaseinstall
  614.     (
  615.         (copyfiles
  616.             (prompt #str-copyafbase)
  617.             (help @copyfiles-help)
  618.             (source (cat #cddevice ":+System+/Info/AFBase"))
  619.             (dest #afbasedir)
  620.             (infos)
  621.             (optional nofail force)
  622.             (confirm)
  623.         )
  624.         (set #datadir (tackon #afbasedir "AFBase_data"))
  625.         (if (NOT (exists #datadir))
  626.             (makedir #datadir)
  627.         )
  628.         (copyfiles
  629.             (prompt #str-copyafbase)
  630.             (help @copyfiles-help)
  631.             (source (cat #cddevice ":+System+/Info/AFBase_data"))
  632.             (dest #datadir)
  633.             (all)
  634.             (infos)
  635.             (optional nofail force)
  636.             (confirm)
  637.         )
  638.     )
  639. )
  640.  
  641. (complete 80)
  642.  
  643. (if #aminetinstall
  644.     (copyfiles
  645.         (prompt #str-copyaminetindex)
  646.         (help @copyfiles-help)
  647.         (source (cat #cddevice ":-In_the_Mag-/Reader_Requests/Aminet_Index"))
  648.         (dest #aminetdir)
  649.         (infos)
  650.         (noposition)
  651.         (optional nofail askuser)
  652.         (confirm)
  653.     )
  654. )
  655.  
  656. (complete 90)
  657.  
  658. (if #unpackersinstall
  659.     (copyfiles
  660.         (prompt #str-copyunpackers)
  661.         (help @copyfiles-help)
  662.         (source (cat #cddevice "C"))
  663.         (choices "LhA" "LZX" "UnZip")
  664.         (dest #unpackersdir)
  665.         (optional nofail askuser)
  666.         (confirm)
  667.     )
  668. )
  669.  
  670. (if #muibaseinstall
  671.     (
  672.         (set #mbdir (tackon #cddevice "+System+/Tools/WB/MUIbase"))
  673.         (set #error (run ("cd %s\x0arun <>NIL: :+System+/C/Installer \"%s\" APPNAME \"MUIbase V1.2\" DEFUSER AVERAGE LOGFILE t:MUIbase_install.log" #mbdir "Install-MUIbase")
  674.                 (prompt #str-muibaselaunch)
  675.                 (help "")
  676.                 (confirm)
  677.             )
  678.         )
  679.         (if (<> #error 0)
  680.             (message #str-muibasefail)
  681.         )
  682.     )
  683. )
  684.  
  685. ;**************
  686. ; SAVE CHOICES
  687. ;**************
  688.  
  689. (complete 99)
  690.  
  691. (P_SaveChoices)
  692.  
  693. ;*********
  694. ; THE END
  695. ;*********
  696.  
  697. (complete 100)
  698.  
  699. (exit #str-complete (quiet))
  700.